<?php

namespace App\Http\Controllers\Home;

use App\Http\Servers\Home\BaseServer;
use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class IndexController extends CommonController
{
    public function index(Request $request, BaseServer $baseServer)
    {
        if (config('area')) {
            $data['title'] = config('set.web_title') . '_' . config('range')[config('area')] . '分站';
        } else {
            $data['title'] = config('set.web_title');
        }
        
        $data['keywords'] = config('set.web_keywords');
        $baseServer->keywordDowork($request, $data['keywords']);

        $data['description'] = config('set.web_description');

        if ((bool)config('set.wap_jump') && is_mobile()) {
            return view('home.m.' . config('set.wap_theme') . '.index.index', $data);
        }

        return view('home.pc.index.index', $data);
    }
}


